Opened 12 years ago
Closed 11 years ago
#2165 closed defect (fixed)
ST_NumPoints regression failure with CircularString
Reported by: | robe | Owned by: | pramsey |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 2.0.4 |
Component: | postgis | Version: | 2.0.x |
Keywords: | history | Cc: |
Description
I know we said that ST_NumPoints along with family of ST_StartPoint, ST_EndPoint etc should only work with single linestrings.
I do think though if I am not mistaken, that OGC considers ST_CircularString as a subset of the Linestring family. In updating PostGIS in Action book for Second Edition, CircularString now returns NULL where as in 1.5 and below, it used to return a number. The other regressions are expected but this one I don't think is. Sample query from book:
SELECT type, ST_NPoints(geom) As npoints, ST_NumPoints(geom) As numpoints FROM (VALUES ('LinestringM' , ST_GeomFromEWKT('LINESTRINGM(1 2 3, 3 4 5, 5 8 7, 6 10 11)')), ('Circularstring', ST_GeomFromText('CIRCULARSTRING(2.5 2.5, 4.5 2.5, 4.5 4.5)')), ('Polygon (Triangle)', ST_GeomFromText('POLYGON((0 1,1 -1,-1 -1,0 1))')), ('Multilinestring', ST_GeomFromText('MULTILINESTRING ((1 2, 3 4, 5 6), (10 20, 30 40))')), ('Collection', ST_Collect( ST_GeomFromText('POLYGON((0 1,1 -1,-1 -1,0 1))'), ST_Point(1,3))) ) As foo(type, geom);
— in 1.5
type | npoints | numpoints --------------------+---------+----------- LinestringM | 4 | 4 Circularstring | 3 | 3 Polygon (Triangle) | 4 | Multilinestring | 5 | 3 Collection | 5 |
— in 2.0, 2.1
type | npoints | numpoints --------------------+---------+----------- LinestringM | 4 | 4 Circularstring | 3 | Polygon (Triangle) | 4 | Multilinestring | 5 | Collection | 5 |
Change History (5)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 by , 11 years ago
Keywords: | history added |
---|
comment:4 by , 11 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
This is missing an entry in the NEWS file
comment:5 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
I see this in the news file already.
What do you think about just having the npoints behavior on numpoints?